import type { UserInfo } from '@vben/types';

import { baseRequestClient } from '#/api/request';
import { useAuthStore } from '#/store/auth';
/**
 * 获取用户信息
 */
export async function getUserInfoApi() {
  const authStore = useAuthStore();
  const userId = authStore?.userIdData ?? '';
  const resp = baseRequestClient.get<UserInfo>(
    `/portal/user/getCurrentUser.do?sessionUserKey=${userId}`,
  );
  return resp;
}
// export async function getUserInfoApi() {
//   return requestClient.get<UserInfo>('/user/info');
// }
